home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / screen / error.frm < prev    next >
Text File  |  1994-11-28  |  2KB  |  99 lines

  1. VERSION 2.00
  2. Begin Form frmError 
  3.    BorderStyle     =   3  'Fixed Double
  4.    ClientHeight    =   2175
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1485
  7.    ClientWidth     =   4515
  8.    Height          =   2580
  9.    Left            =   1035
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   2175
  14.    ScaleWidth      =   4515
  15.    Top             =   1140
  16.    Width           =   4635
  17.    Begin Timer Timer1 
  18.       Enabled         =   0   'False
  19.       Interval        =   30000
  20.       Left            =   3420
  21.       Top             =   1620
  22.    End
  23.    Begin CommandButton cmdOK 
  24.       Cancel          =   -1  'True
  25.       Caption         =   "OK"
  26.       Default         =   -1  'True
  27.       Height          =   435
  28.       Left            =   1500
  29.       TabIndex        =   2
  30.       Top             =   1560
  31.       Width           =   1215
  32.    End
  33.    Begin Image Image1 
  34.       Height          =   480
  35.       Left            =   180
  36.       Picture         =   ERROR.FRX:0000
  37.       Top             =   240
  38.       Width           =   480
  39.    End
  40.    Begin Label Label2 
  41.       Caption         =   "Check your screen saver password and try again."
  42.       Height          =   495
  43.       Left            =   840
  44.       TabIndex        =   1
  45.       Top             =   780
  46.       Width           =   3555
  47.    End
  48.    Begin Label Label1 
  49.       Caption         =   "Incorrect Password;"
  50.       Height          =   255
  51.       Left            =   840
  52.       TabIndex        =   0
  53.       Top             =   300
  54.       Width           =   3015
  55.    End
  56. End
  57. Option Explicit
  58.  
  59. '
  60. ' This form could be a Message box, however in order for
  61. ' for it to appear above the main screen and be System Modal
  62. ' we need to make it a form
  63.  
  64. Sub cmdOK_Click ()
  65.     Unload Me
  66. End Sub
  67.  
  68. Sub Form_Load ()
  69.     
  70. Dim i As Integer
  71.     'Enable the Timer
  72.     timer1.Enabled = True
  73.     caption = SaverName
  74.     CentreForm Me
  75.     ' Set the Form to be TopMost
  76.     SetWindowPos Me.hWnd, -1, 0, 0, 0, 0, 3
  77.     ' Set the Form to be System Modal (Ouch!)
  78.     i = SetSysModalWindow(hWnd)
  79.  
  80. End Sub
  81.  
  82. Sub Form_Unload (Cancel As Integer)
  83.     
  84.     'Disable the Timer
  85.     timer1.Enabled = False
  86.  
  87. End Sub
  88.  
  89. Sub Timer1_Timer ()
  90.     
  91.     '
  92.     ' if we have had no activity for 30 seconds then
  93.     ' let the screen saver get on with it.
  94.     '
  95.     Unload Me
  96.  
  97. End Sub
  98.  
  99.